#include "CLabelUtil.h"


CLabelUtil::CLabelUtil() {}

CLabelUtil::~CLabelUtil() {}


bool CLabelUtil::saveLabelList(QVariantMap map) {
    QVariantList groups = map["group"].toList();
    for(int i = 0; i < groups.count(); i++) {
        QVariant group = groups[i];
        QVariantMap dataMap = group.toMap();

        qDebug()<< i << ":"<<dataMap["labelName"].toString()<<dataMap["labelColor"].toString();
        QFile file("d:/out.txt");
        if(file.open(QIODevice::WriteOnly)) {
            QTextStream stream(&file);
            QString sdata = QString::number(i, 10) + ":" + dataMap["labelName"].toString() + ":" + dataMap["labelColor"].toString();
            stream << sdata;
        }

    }
    return true;

}



